import router from "./index";
import store from "../store";

// 路由守卫
router.beforeEach((to, from, next) => {
  if(to.meta && to.meta.title) {
    const routerName = to.meta.title;
    document.title = routerName;
    store.commit("app/SET_ROUTER_NAME",routerName);
  }
  next();
})